/*
 * @FilePath: api_case_module.ts
 * @@author: wjj
 * @Date: 2025-10-16 14:57:27
 * @@Description: new js file
 */
import request from '@/utils/request'
import { da } from 'element-plus/es/locale'
enum API {
  APIPREJECT = '/api-case-module',
}
export const reqGetApiCaseModule = (
  page: number,
  limit: number,
  keyword: string,
  asc: string,
) =>
  request.get<any, any>(
    API.APIPREJECT +
      `?page=${page}&page_size=${limit}&keyword=${keyword}&asc=${asc}`,
  )

export const reqPostApiCaseModule = (data: any) =>
  request.post<any, any>(API.APIPREJECT, data)

export const reqPutApiCaseModule = (id: number, data: any) =>
  request.put<any, any>(API.APIPREJECT + `/${id}`, data)

export const reqDeleteApiCaseModule = (id: number) =>
  request.delete<any, any>(API.APIPREJECT + `/${id}`)

export const reqGetOneApiCaseModule = (id: number) =>
  request.get<any, any>(API.APIPREJECT + `/${id}`)

export const reqPostImportCurl = (curlString: string) =>
  request.post<any, any>('/case/curl-json', { curl_string: curlString })

export const reqPostExportCurl = (data: any) =>
  request.post<any, any>('/case/json-curl', { json_curl_data: data })
